namespace cpp mp2
namespace py mp2

struct myID{
	1: i32 id;	
	2: i32 port;
}

service MyService {
	void notify(1:myID in_id);
	
	myID getPredecessor(1: myID in_id);

	myID findSuccessor(1: myID in_id);

	myID getSuccessor();
	
	myID closestPrecedingFinger(1: myID in_id);

	string addFile(1: i32 key, 2:string data, 3:string fname);
	
	string delFile(1: i32 key, 2:string fname);
	
	string getFile(1: i32 key, 2:string fname);

	string getTable(1: i32 id);
}
